// 认证工具函数
export function checkAuth() {
  const token = localStorage.getItem('token')
  return !!token
}

export function getToken() {
  return localStorage.getItem('token')
}

export function setToken(token) {
  localStorage.setItem('token', token)
}

export function removeToken() {
  localStorage.removeItem('token')
  localStorage.removeItem('refresh_token')
}

export function getRefreshToken() {
  return localStorage.getItem('refresh_token')
}

export function setRefreshToken(token) {
  localStorage.setItem('refresh_token', token)
}
